package com.villaday.idf.base.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.villaday.idf.model2.ChaozhiTemaiHistory;
import com.villaday.idf.model.BournSearchhistory;
import com.villaday.idf.model.City;
import com.villaday.idf.model.FaPiaoTitleEntity;
import com.villaday.idf.model.H;
import com.villaday.idf.model.V;

import com.villaday.idf.base.greendao.ChaozhiTemaiHistoryDao;
import com.villaday.idf.base.greendao.BournSearchhistoryDao;
import com.villaday.idf.base.greendao.CityDao;
import com.villaday.idf.base.greendao.FaPiaoTitleEntityDao;
import com.villaday.idf.base.greendao.HDao;
import com.villaday.idf.base.greendao.VDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig chaozhiTemaiHistoryDaoConfig;
    private final DaoConfig bournSearchhistoryDaoConfig;
    private final DaoConfig cityDaoConfig;
    private final DaoConfig faPiaoTitleEntityDaoConfig;
    private final DaoConfig hDaoConfig;
    private final DaoConfig vDaoConfig;

    private final ChaozhiTemaiHistoryDao chaozhiTemaiHistoryDao;
    private final BournSearchhistoryDao bournSearchhistoryDao;
    private final CityDao cityDao;
    private final FaPiaoTitleEntityDao faPiaoTitleEntityDao;
    private final HDao hDao;
    private final VDao vDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        chaozhiTemaiHistoryDaoConfig = daoConfigMap.get(ChaozhiTemaiHistoryDao.class).clone();
        chaozhiTemaiHistoryDaoConfig.initIdentityScope(type);

        bournSearchhistoryDaoConfig = daoConfigMap.get(BournSearchhistoryDao.class).clone();
        bournSearchhistoryDaoConfig.initIdentityScope(type);

        cityDaoConfig = daoConfigMap.get(CityDao.class).clone();
        cityDaoConfig.initIdentityScope(type);

        faPiaoTitleEntityDaoConfig = daoConfigMap.get(FaPiaoTitleEntityDao.class).clone();
        faPiaoTitleEntityDaoConfig.initIdentityScope(type);

        hDaoConfig = daoConfigMap.get(HDao.class).clone();
        hDaoConfig.initIdentityScope(type);

        vDaoConfig = daoConfigMap.get(VDao.class).clone();
        vDaoConfig.initIdentityScope(type);

        chaozhiTemaiHistoryDao = new ChaozhiTemaiHistoryDao(chaozhiTemaiHistoryDaoConfig, this);
        bournSearchhistoryDao = new BournSearchhistoryDao(bournSearchhistoryDaoConfig, this);
        cityDao = new CityDao(cityDaoConfig, this);
        faPiaoTitleEntityDao = new FaPiaoTitleEntityDao(faPiaoTitleEntityDaoConfig, this);
        hDao = new HDao(hDaoConfig, this);
        vDao = new VDao(vDaoConfig, this);

        registerDao(ChaozhiTemaiHistory.class, chaozhiTemaiHistoryDao);
        registerDao(BournSearchhistory.class, bournSearchhistoryDao);
        registerDao(City.class, cityDao);
        registerDao(FaPiaoTitleEntity.class, faPiaoTitleEntityDao);
        registerDao(H.class, hDao);
        registerDao(V.class, vDao);
    }
    
    public void clear() {
        chaozhiTemaiHistoryDaoConfig.clearIdentityScope();
        bournSearchhistoryDaoConfig.clearIdentityScope();
        cityDaoConfig.clearIdentityScope();
        faPiaoTitleEntityDaoConfig.clearIdentityScope();
        hDaoConfig.clearIdentityScope();
        vDaoConfig.clearIdentityScope();
    }

    public ChaozhiTemaiHistoryDao getChaozhiTemaiHistoryDao() {
        return chaozhiTemaiHistoryDao;
    }

    public BournSearchhistoryDao getBournSearchhistoryDao() {
        return bournSearchhistoryDao;
    }

    public CityDao getCityDao() {
        return cityDao;
    }

    public FaPiaoTitleEntityDao getFaPiaoTitleEntityDao() {
        return faPiaoTitleEntityDao;
    }

    public HDao getHDao() {
        return hDao;
    }

    public VDao getVDao() {
        return vDao;
    }

}
